package cn.edu.sdu.order.backend.controller;

import cn.edu.sdu.order.backend.annotation.NeedSwagger;
import cn.edu.sdu.order.backend.dto.FpgaDTO;
import cn.edu.sdu.order.backend.model.ResultContext;
import cn.edu.sdu.order.backend.service.FpgaService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "fpga部分")
@RequestMapping("fpga")
@NeedSwagger
public class FpgaController {

    @Autowired
    private FpgaService fpgaService;

    @PostMapping("update")
    public ResultContext update(@RequestBody FpgaDTO fpgaDTO) {
        return ResultContext.returnSuccess(fpgaService.update(fpgaDTO));
    }
}
